Imports System.Collections.Generic

Public Class SharePointContentType

    Private _id As String
    Private _name As String
    Private _nameid As String = String.Empty
    Private _fields As New List(Of SharePointField)

   
    Public Sub New(ByVal name As String, ByVal id As String)
        _id = id
        _name = name
    End Sub

    Public ReadOnly Property Id() As String
        Get
            Return _id
        End Get
    End Property

    Public ReadOnly Property Name() As String
        Get
            Return _name
        End Get
    End Property

    Public ReadOnly Property NameId() As String
        Get
            Return _nameid
        End Get
    End Property

    Public Sub LoadNameId()
        _nameid = (From f In _fields _
                   Where f.Name = "FileLeafRef" _
                   Select f.Id).Single()
    End Sub

End Class
